/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-07-06
 * Time: 22:16
 */
public class Test {
    public static void main(String[] args) {
        String s1 = "hello";
        String s2 = new String("123");
        char[] chars = {'4','5','6'};
        String s3 = new String(chars);
        //字符串求长度 引用.length()
        System.out.println(s1.length());
        System.out.println("hello".length());
        //数组求长度 引用.length
        System.out.println(chars.length);
        System.out.println(s1.compareTo(s2));

    }
}
